
<!---
Kalendar

COPYRIGHT & LICENSING INFO
-------------------------------------------------------------------

Copyright 2006 TJ Downes - tdownes@sanative.net - http://www.sanative.net

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

--->

<cfsilent>
	<cfset Input = structNew() />
	<cfset Input.view = "" />
	<cfset Input.LinkDate = now() />
	<cfset Input.CategoryID = "" />
	<cfset structAppend( Input, url ) />
	<cfset structAppend( Input, form ) />
	<cfset LightWire = createobject("component", "Kalendar.common.cfc.LightWire" ).init( createobject("component", "Kalendar.common.cfc.LightWireConfig" ).init() ) >
	<cfset Kalendar = LightWire.getTransient("Kalendar") />
	<cfset KalendarCategories = LightWire.getTransient("KalendarCategories") />
	<cfset KalendarConfig = LightWire.getTransient("KalendarConfig") />
	<cfset KalendarRequest = LightWire.getTransient("KalendarRequest") />
	<cfset KalendarRequest.setView( Input.View ) />
	<cfset KalendarRequest.setLinkDate( Input.LinkDate ) />
	<cfset KalendarRequest.setCategoryID( Input.CategoryID ) />
</cfsilent>

<cfif KalendarRequest.getView() IS "rss" >
	<cfcontent type="text/xml" reset="true"><cfoutput>#trim(Kalendar.KalendarXML(view=KalendarRequest.getInternalView(), timeHeaderClass='timeHeader', linkdate=KalendarRequest.getDBFormatLinkDate(), PublicOnly=1,CategoryID=KalendarRequest.getCategoryID()))#</cfoutput>
	<cfsetting showdebugoutput="no" />
	<cfabort />
</cfif>

<cfsilent>
	<cfset KalendarRequest.setReturnedEvents( Kalendar.getCalendar( view=KalendarRequest.getInternalView(), timeHeaderClass='timeHeader', linkdate=KalendarRequest.getDBFormatLinkDate(), PublicOnly=1,CategoryID=KalendarRequest.getCategoryID() ) ) />
	<cfset KalendarRequest.setCategoriesRS( KalendarCategories.getMultipleRecords() ) />
</cfsilent>

<cfcontent reset="true"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><cfoutput>#KalendarRequest.getKalendarConfig().getAppTitle()#</cfoutput></title>
	<link href="<cfoutput>#KalendarRequest.getKalendarConfig().getCSSPath()#</cfoutput>kalendar.css" rel="stylesheet" type="text/css" />
	<link rel="alternate" type="application/rss+xml" title="Kalendar of Events for <cfoutput>#KalendarRequest.getLongLinkDate()#</cfoutput>" href="http://<cfoutput>#cgi.server_name##cgi.script_name#?view=rss</cfoutput>" />
</head>
<body>
<div class="clearfix" style="width:750px; margin-left: auto; margin-right: auto; margin-bottom: 25px;">
	<div style="float:left; text-align:left; width:300px;"><a href="<cfoutput>#KalendarRequest.getKalendarConfig().getKalendarAdminPath()#</cfoutput>">admin</a>&nbsp;&middot;&nbsp;<a href="http://kalendar.riaforge.org/">download</a>&nbsp;&middot;&nbsp;<a href="http://kalendar.sanative.net/README.txt">README</a>&nbsp;&middot;&nbsp;<a href="http://kalendar.sanative.net/HISTORY.txt">HISTORY</a></div>
	<div style="float:right; width:25px; text-align:right; width:25px;"><a href="http://<cfoutput>#cgi.server_name##cgi.script_name#?view=rss</cfoutput>"><img src="<cfoutput>#KalendarRequest.getKalendarConfig().getImagePath()#</cfoutput>rssfeed16x16.gif" alt="RSS" /></a></div>
</div>
<div style="margin-left: auto; margin-right: auto; width:750px;">

<cfmodule template="#KalendarRequest.getKalendarConfig().getCustomTagPath()#kalendar.cfm"
		view="#KalendarRequest.getView()#"
		eventrecords="#KalendarRequest.getReturnedEvents()#"
		categoriesRS="#KalendarRequest.getCategoriesRS()#"
		linkdate="#KalendarRequest.getLinkDate()#"
		categoryid="#KalendarRequest.getCategoryID()#"
		excludetimeheader="no"
		tooltipsublength="50"
		maxdescriptionsize="150"
		calendarlinkpage="eventdetails.cfm"
		includedetailsunderminicalendar="1"
		minicalendardetailsincludepath="#KalendarRequest.getKalendarConfig().getMiniCalendarPath()#"
		kalendarconfig="#KalendarRequest.getKalendarConfig()#"	>

version: <cfoutput>#KalendarRequest.getKalendarConfig().getKalendarBuildNumber()#</cfoutput>
</div>
</body>
</html>